const { User } = require('../models')
module.exports = class SearchProxy {
  static async findOne (query) {
    return User.findOne(query)
  }
  static async newAndSave (account, password) {
    const newUser = new User({
      account,
      password
    })
    return newUser.save()
  }
}
